package test;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author ycj
 * @version 1.0
 * @description
 * @date 2021/1/11 14:37
 */
public class text4 {
    public static void main(String[] args) {
        text3 text3 = new text3();
        ThreadPoolExecutor executor = new ThreadPoolExecutor(10, 100, 60L, TimeUnit.MILLISECONDS, new ArrayBlockingQueue(500));
        for (int i = 0; i < 5; i++) {
            executor.execute(text3);
        }
//        new Thread(text3, "线程1").start();
//        new Thread(text3, "线程2").start();
//        new Thread(text3, "线程3").start();
//        new Thread(text3, "线程4").start();
//        new Thread(text3, "线程5").start();
    }
}
